import {getAreaCircleList} from '../../request/api/setting/area';

const state = {
    area_circle_list: '',
};

const mutations = {
    SET_AREA_CIRCLE: (state, list) => {
        state.area_circle_list = list;
    },
};

const actions = {
    getAreaCircleList({commit}) {
        return new Promise((resolve, reject) => {
            getAreaCircleList().then(datas => {
                commit("SET_AREA_CIRCLE", datas.list);
                resolve();
            }).catch(error => {
                reject(error);
            });
        });
    },
};

export default {
    namespaced: true,
    state,
    mutations,
    actions
}

